package com.zhiyou100.superDemo;

/**
 * 教师类
 * 通过extends继承Person
 */
public class Teacher extends Person {

    int tYear;
    String tDept;

    //子类重写父类的方法 实现自己的自我介绍
    public void introduction(){
        System.out.println("我叫" + name + ",今年" + age + ",性别" + sex + ",身份证号" + idCard +
                ",教龄" + tYear + ",专业" + tDept);
    }
}
